<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- <button onclick="run()">暂停</button>
    <button onclick="state()">开始</button> -->
    <!-- <input type="text" name="time" placeholder="时间" id="text">
        
        <input type="button" name="start" value="开始" id="button1">

        <input type="button" name="stop" value="暂停" id="button2">
       
        <script type="text/javascript">
            
            //获取文本框、开始按钮和暂停按钮
            var btn1=document.getElementById("button1"),

                btn2=document.getElementById("button2"),

                time=document.getElementById("text"),

                num=0;
            
            //给开始按钮绑定鼠标点击事件
            btn1.onclick=function btn1(){
                
                time.value=num;

                num++;

                var timeoutid=setTimeout(btn1,100);

                //给暂停按钮绑定鼠标点击事件
                btn2.onclick=function(){

                    button1.value="继续";
                
                    clearTimeout(timeoutid);

                }
                
            }
            
        </script> -->
    <script>
                    var e
        edge = setTimeout (function () {
        	console.log (e)
        }, 1000)
        clearTimeout (e);
        function fun () {
        	console.log ("执行")
        }
        setTimeout (fun (), 1000)

        var time = 0, timeM = 0, timer
        timer = setInterval(timePlus(), 1000)
        function timePlus() {
            time++
        }
        clearInterval(timer)
        while (time >= 60) {
            time = time - 60
            timeM++
        }
        if (time < 10) {
            time = "0" + time
        }
        time = timeM + ":" + time
    </script>
</body>

</html>